package com.snow.datasource.healths;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
import org.springframework.boot.actuate.endpoint.web.annotation.WebEndpoint;
import org.springframework.boot.actuate.health.Health;

/**
 * @Description
 * @Author fanxl
 * @Date 2020/12/24
 **/
@WebEndpoint(id = "masterSlave")
public class MasterSlaveEndpoint {
    @Autowired
    private MasterSlaveHealth masterSlaveHealth;

    @ReadOperation
    public Health masterSlave(){
        return masterSlaveHealth.health();
    }
}
